package cn.lg.soar.system.api.enums;

import cn.lg.soar.common.annotations.DictDefine;
import cn.lg.soar.common.data.dict.IDict;
import com.baomidou.mybatisplus.annotation.IEnum;
import com.fasterxml.jackson.annotation.JsonValue;

/**
 * @author luguoxiang
 * 开源项目：https://gitee.com/lgx1992/lg-soar 求star！请给我star！请帮我点个star！
 */
@DictDefine(name = "配置值类型")
public enum ConfigValueTypeEnum implements IDict<Integer>, IEnum<Integer> {

    JSON("json", 0),
    TEXT("文本", 1),
    NUMBER("数值", 2),
    BOOLEAN("布尔", 3),
    RICH_TEXT("富文本", 4),
    FILE("文件", 5),
    IMG("图片", 6),
    ;

    ConfigValueTypeEnum(String label, Integer value){
        this.label = label;
        this.value = value;
    }

    @JsonValue
    private final Integer value;
    private final String label;
    @Override
    public Integer getValue() {
        return value;
    }

    @Override
    public String getLabel() {
        return this.label;
    }

}
